package com.example.pest.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.pest.pojo.XxRoomReservation;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
* @author aisen
* @description 针对表【xx_room_reservation(自习室预约表)】的数据库操作Mapper
* @createDate 2024-12-20 00:14:58
* @Entity generator.domain.XxRoomReservation
*/
public interface XxRoomReservationMapper extends BaseMapper<XxRoomReservation> {

    //抢位置
    @Update(" update xx_room_reservation set use_count = use_count + 1 where id = #{id} and zw_count > use_count")
    int qiangWeiZhi(@Param("id") long id);
}




